﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IPCMessage
{
    /// <summary>
    /// 服务端回复请求命令消息协议
    /// </summary>
    public class IPCResponseMessage
    {
        public string TID { get; set; }

        public RequestCommand ExcuteCommand { get; set; }

        /// <summary>
        /// 执行命令返回的错误代码
        /// -13  拍照中断
        /// -12  拍照取消
        /// -15  拍照过程发生了错误
        /// </summary>
        public int ErrorCode { get; set; }

        /// <summary>
        /// 命令是否执行成功
        /// </summary>
        public bool Success { get; set; }

        /// <summary>
        /// 命令执行耗费的时间
        /// </summary>
        public int ElapsedSecond { get; set; }

        /// <summary>
        /// 返回消息（或错误信息的描述）
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// 命令执行完成后输出的参数（JsonString）
        /// </summary>
        public string OutParams { get; set; }

        public IPCResponseMessage()
        {
            
        }

        public IPCResponseMessage(RequestCommand cmd)
        {
            ExcuteCommand = cmd;
        }
    }
}
